import { computed, watch, watchEffect } from "vue";
import { useDynamicStore } from "@/stores/modules/dynamic";
const dynamicStore = useDynamicStore();
console.log(dynamicStore.tableSelect.length);
export const folderAdd_status = computed(() => {
  if (dynamicStore.tableSelect.length > 2) {
    return false;
  } else {
    return true;
  }
});
const arr = JSON.stringify(dynamicStore.tableSelect);
watch(
  () => arr,
  (newVal, oldVal) => {
    console.log(newVal, oldVal);

    // if (dynamicStore.tableSelect.length > 2) {
    //   return false;
    // } else {
    //   return true;
    // }
  },
  {
    deep: true
  }
);

// watchEffect(() => {
//   arr;
//   console.log(arr);
// });
